Update PHPUnit, Install phpunit-watcher #472
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PHPUnit was updated to the latest version (
9.5
), and function signatures/assertions were updated to match. I also used WP's currently recommended setup/teardown methods and fixtures.This also installs
phpunit-watcher
, since it makes developing tests much easier. It's used in Gutenberg, WordCamp.org, and several other WP repos.This was branched off from #469. I belive all of the comments raised there have been addressed:
/dev/tty
seems to work fine in this environment, but there's more information in Readme: Document input redirection fix. spatie/phpunit-watcher#112 if we ever run into it.--timeout=0
flag didn't work for me, Composer would still time out after 5 minutes. I was able to get it working by includingComposer\\Config::disableProcessTimeout
as part of the task, though. The background info on that is at Symfony process ProcessTimedOutException spatie/phpunit-watcher#63 (comment).